package zut.cs.liziflower.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author xuwenke
 * @since 2022-05-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Order对象", description = "")
@TableName("order")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单id")
    @TableId(value = "orderid", type = IdType.AUTO)
    private Integer orderid;

    @ApiModelProperty(value = "消费者id 外键")
    private Integer userid;

    @ApiModelProperty(value = "收货地址 外键")
    private Integer addressid;

    @ApiModelProperty(value = "总价格")
    private BigDecimal totalprice;

    private String message;

    @ApiModelProperty(value = "0取消，10未支付，20已支付，40已发货，50订单完成")
    private Integer status;

    private LocalDateTime ordertime;

    @TableField(exist = false)
    private String receivephone;

    @TableField(exist = false)
    private String receiceprovince;

    @TableField(exist = false)
    private String receivecity;

    @TableField(exist = false)
    private String receivedistrict;

    @TableField(exist = false)
    private String receiveaddress;

    @TableField(exist = false)
    private BigDecimal money;

    @TableField(exist = false)
    private Integer score;


}
